import request from '@/utils/request'
export const getEmployeeSimple = () => request.get('/sys/user/simple')
export const getEmployeesList = (params) => request.get('/sys/user', { params })
export const delEmployee = (id) => request.delete(`/sys/user/${id}`)
export const addEmployee = (data) => request.post('/sys/user', data)
export const updateEmployee = (data) => request.put(`/sys/user/${data.id}`, data)
export const importEmployeeList = (data) => request.post('/sys/user/batch', data)
export function getJobDetail(id) {
  return request({
    url: `/employees/${id}/jobs`,
    method: 'get'
  })
}
export const assignRoles = (data) => request.put('/sys/user/assignRoles', data)
